package demo1;

public class Tect {
    public static void main(String[] args) {
        String str1 = "helloworld";
        //System.out.println(str1.substring(5));
        String str2 = str1.substring(4, 7);
        System.out.println(str2);
        str2.trim()
    }
        public static void main3(String[] args) {
        String str1 = "ab-cd-ef=gh=ij-kl=mn";


        String[] strings = str1.split("-");

        for (int i = 0 ; i < strings.length;i++){
            String[] tmp = strings[i].split("=");
            for(String str : tmp){
                System.out.println(str);
            }
        }
        String[] strings1 = str1.split("-|=");
        for (String str: strings1) {
            System.out.println(str);
        }
    }
    public static void main2(String[] args) {
        String str1 = "abcaeabcfgabc";
        System.out.println(str1.replace('a', 'z'));
        System.out.println("===========");
        System.out.println(str1.replaceFirst("abc", "de"));
    }
    public static void main1(String[] args) {
        Student student1 = new Student(2,"a");
        Student student2 = new Student(2,"b");
        NameCompare nameCompare = new NameCompare();
        System.out.println(student1.equals(student2));
        String str1 = "abcdefg";
        String str2 = new String("abc");
        System.out.println(str1.equals(str2));
        System.out.println("============");
        System.out.println(str2.charAt(1));
        System.out.println("============");
        System.out.println(str2.indexOf('a'));
        System.out.println("============");
        System.out.println(str1.lastIndexOf('c',1));
        System.out.println("============");
        System.out.println(str1.lastIndexOf("ef",3));
        double a = Double.parseDouble("12.34");
        System.out.println(a);
        System.out.println(str1.toUpperCase());
        char[] ch = str1.toCharArray();
        char[] ch1 = new char[10];

    }
}
